define(()=>{
    return function (res,ele){
        let str = "";
        res.forEach(val => {
            str += `<li class="${val.goodsId}"><a href=""><img src="${val.proImg}" alt=""></a>
                    <span class="zhuanke">${val.proName}</span>
                    <a href="" class="SPmingcheng">${val.proid}</a>
                    <span class="jiage">RMB ${val.price}</span>
                    <button class="add">加入购物车</button>
                    </li>`;
                    //字符串结构拼接
            
        });
        ele.html(str);
    }
})